﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Common_Menu : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    /// <summary>
    /// 获取时段俗称
    /// </summary>
    /// <returns></returns>
    protected string GetTimeSpanNick()
    {
        int hour = DateTime.Now.Hour;
        if (hour < 5)
        {
            return "凌晨";
        }
        else if (hour < 12)
        {
            return "上午";
        }
        else if (hour < 18)
        {
            return "下午";
        }
        else { return "晚上"; }
    }

}
